package com.adingxiong.pm.model;

/**
 * @Description: 响应码枚举，参考HTTP状态码的语义
 *
 */
public enum RetCode {

    // 成功
    SUCCESS(200,"请求成功"),
    // 失败
    FAIL(400,"请求失败"),
    //参数不对
    PARAM_ERROR(401,"参数不对"),
    // 接口不存在
    NOT_FOUND(404,"接口不存在"),


    //参数值不对
    PARAM_VALUE_ERROR(402,"参数值不对"),
    //系统内部错误
    SYSTEM_ERROR(502,"系统内部异常"),
    // 服务器内部错误
    INTERNAL_SERVER_ERROR(500,"服务器异常");

    RetCode(int code,String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int code;

    public String msg;
    public int getCode() {
        return code;
    }
    public String getMsg() {
        return msg;
    }

}
